let Log = (content) => {
  return {
    time: new Date().format('hh:mm:ss'),
    content
  }
};
let Logger = () => {
  return {
    logs: [],
    push(content) {
      this.logs.push(new Log(content))
    },
    last(n) {
      return this.logs.slice(-n);
    },
    attack(from, to, damage) {
      let content = `${from}对${to}造成了${damage}点伤害`;
      this.push(content);
    }
  }
};

export default {
  Log,
  Logger
};
